1
|
|
|
window.Utilities={random_int:function(t,n){return Math.floor(Math.random()*(n-t)+t)},urandom:function(t){let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(Utilities.random_int(0,256));return n},fillArray:function(t,n){const r=[];for(let e=0;e<n;e++)r.push(t);return r},arrToInt:function(t){return parseInt(Array.prototype.map.call(t,t=>("00"+t.toString(16)).slice(-2)).join(""),16)},fileReader:function(t){let n=0,r=t;function e(r){let e=t.slice(n,n+r);return n+=r,e}return{readByte:function(){return e(1)[0]},readBytes:e,readBytesAsInt:function(t){return Utilities.arrToInt(e(t))},readBytesAsString:function(t){return Utilities.bytes_to_latin1(e(t))},getCurrentPosition:function(){return n},getLength:function(){return r.length}}},bytes_to_latin1:function(t){return CryptoJS.enc.Latin1.stringify(CryptoJS.enc.Uint8Arr.parse(t))},encode_to_words:function(t,n="Latin1"){return CryptoJS.enc[n].parse(t)}}; |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.